﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMaster.Master" AutoEventWireup="true" CodeBehind="ContractInfo.aspx.cs" Inherits="OAS.ContractInfo" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <link href="Content/bootstrap-datetimepicker.min.css" rel="stylesheet" />
    <script src="Scripts/bootstrap-datetimepicker.js"></script>
    <script src="Scripts/bootstrap-datetimepicker.zh-CN.js"></script>
    <link href="Content/bootstrap.min.css" rel="stylesheet" />

    <script>
    </script>

    <div class="panel panel-primary" style="margin:10px;">
        <asp:Label ID="TitleLabel" runat="server" Text="查询列表" Font-Size="X-Large" style="margin-left:10px;margin-top:30px;"></asp:Label>
        <table class="table" style="margin:10px">
            <tr>
                <th>工厂：</th>
                <td>
                    <asp:DropDownList runat="server" ID="FactoryDropDownList" DataTextField="Code" DataValueField="Code" Width="260" CssClass="form-control"></asp:DropDownList>
                </td>

                <th>制单人：</th>
                <td>
                    <asp:TextBox runat="server" ID="CreateByTextBox" Width="260" CssClass="form-control"></asp:TextBox>
                </td>
            </tr>

            <tr>
                <th>外发厂：</th>
                <td>
                    <asp:TextBox runat="server" ID="ForeignFactoryTextBox" Width="260" CssClass="form-control"></asp:TextBox>
                </td>

                <th>外发工序：</th>
                <td>
                    <asp:TextBox runat="server" ID="ProcessTypeTextBox" Width="260" CssClass="form-control"></asp:TextBox>
                </td>
            </tr>

            <tr>
                <th>任务编号：</th>
                <td>
                    <asp:TextBox runat="server" ID="ContractNoTextBox" Width="260" CssClass="form-control"></asp:TextBox>
                </td>

                <th>任务创建时间：</th>
                <td>
                    <div class="input-group input-medium date-picker input-daterange" data-date-format="yyyy-mm-dd" style="width:200px">
                        <asp:TextBox runat="server" ID="StartTimeTextBox" Width="130" CssClass="form-control dtBegin"
                            placeHolder="请选择开始日期" onchange="setEndTime(this)"/>
                        <span class="input-group-addon">到</span>
                        <asp:TextBox runat="server" ID="EndTimeTextBox" Width="130" CssClass="form-control dtEnd"
                            placeHolder="请选择结束日期" onchange="setStartTime(this)"  />
                    </div>
                    <script type="text/javascript">
                        $(function () {
                            $(".form-control.dtBegin").datetimepicker({
                                language: "zh-CN",    //中文
                                autoclose: true,      //选择后隐藏日期选择框
                                clearBtn: true,         //清除按钮
                                todayBtn: true,         //今日按钮
                                minView: "month",       //选择后不会跳转去选择时分秒
                                format: "yyyy-mm-dd"    //只要年月日
                            });
                        });
                        $(function () {
                            $(".form-control.dtEnd").datetimepicker({
                                language: "zh-CN",    //中文
                                autoclose: true,      //选择后隐藏日期选择框
                                clearBtn: true,         //清除按钮
                                todayBtn: true,         //今日按钮
                                minView: "month",       //选择后不会跳转去选择时分秒
                                format: "yyyy-mm-dd"    //只要年月日
                            });
                        });
                    </script>
                </td>
                <td></td>
            </tr>

            <tr>
                <th>任务状态：</th>
                <td>
                    <asp:CheckBoxList runat="server" ID="CH_Status" RepeatDirection="Horizontal">
                        <asp:ListItem Value="1">草稿</asp:ListItem>
                        <asp:ListItem Value="3">已打包</asp:ListItem>
                        <asp:ListItem Value="9">已取消</asp:ListItem>
                        <asp:ListItem Value="5">已审批</asp:ListItem>
                        <asp:ListItem Value="2">已确定</asp:ListItem>
                        <asp:ListItem Value="4">已提交</asp:ListItem>
                        <asp:ListItem Value="6">已拒绝</asp:ListItem>
                        <asp:ListItem Value="8">全选</asp:ListItem>
                    </asp:CheckBoxList>
                </td>
            </tr>
            <tr>
            </tr>

             <tr>
            <td colspan="2">
                <asp:Button runat="server" Text="查询" ID="SearchButton" OnClick="SearchButton_Click" class="btn btn-success green" />    
                <asp:Button runat="server" Text="创建任务包" ID="Button1"  class="btn btn-success green" />             
            </td>
        </tr>
        </table>


        <div class="panel-heading green" style="font-size:14px">
            <asp:Label ID="GridViewHeaderTextLabel" runat="server" Text="查询结果"></asp:Label>
        </div>

          <asp:UpdatePanel runat="server" ID="ContractdatePanel">
                <ContentTemplate>
                    <asp:GridView CssClass="table table-bordered table-hover" runat="server" ID="ConTractGridView" AutoGenerateColumns="false">
                        <EmptyDataTemplate>
                            暂无数据
                        </EmptyDataTemplate>

                        <Columns>
                            <asp:BoundField DataField="ContractNo" ItemStyle-Width="80" HeaderText="任务编号" />
                            <asp:BoundField DataField="Factory" ItemStyle-Width="80" HeaderText="工厂" />
                            <asp:BoundField DataField="ProcessType" ItemStyle-Width="80" HeaderText="外发工序" />
                            <asp:BoundField DataField="ForeignFactory" ItemStyle-Width="90" HeaderText="外发厂" />
                            <asp:BoundField DataField="CreatedBy" ItemStyle-Width="80" HeaderText="创建人" />
                            <asp:BoundField DataField="CreatedDate" ItemStyle-Width="80" HeaderText="创建日期" />
                            <asp:BoundField DataField="ContractQty" ItemStyle-Width="90" HeaderText="合同数量" />
                            <asp:BoundField DataField="Currency" ItemStyle-Width="80" HeaderText="单位" />
                            <asp:BoundField DataField="ContractAmount" ItemStyle-Width="80" HeaderText="合同金额" />
                            <asp:BoundField DataField="Description" ItemStyle-Width="80" HeaderText="合同状态" />
                        </Columns>
                    </asp:GridView>

                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" Width="100%" 
                        CssClass="pager"
                        LayoutType="Ul"
                        PagingButtonLayoutType="UnorderedList"
                        PagingButtonSpacing="0"
                        CurrentPageButtonClass="active"
                        ShowPageIndexBox="Never"
                        PageSize="5"
                        NumericButtonCount="5"
                        OnPageChanged="AspNetPager1_PageChanged">
                    </webdiyer:AspNetPager>

                </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
